/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package metro.jme.lottery.util;

/**
 * This class provides a set of helper methods to convert things.
 * @author pierre
 */
public class Converter {
	
	/**
	 * Method returns the bye array of the integer value
	 * @param value
	 * @return 
	 * @deprecated 
	 */
	public static byte[] intToByteArray(int value) {
		byte[] b = ((String)""+value).getBytes();
		
        return b;
    }
	
	/**
	 * Methode use to convert weird character in s
	 * For instance 6+1 is written 6+l on the given web page
	 * @param s
	 * @return 
	 */
	public static String dummyConverter(String s) {
		char[] new_string = s.toCharArray();
		int last_index = new_string.length - 1;
		char last_char = new_string[last_index];
		if(last_char == 'l') {
			new_string[last_index] = '1';
		}
		
		return new String(new_string);
	}
	
}
